Don't call xcsv setup when we're not dealing with an xcsv file. Fixes
authorrobertl <robertl>
Tue, 4 May 2010 13:22:17 +0000 (13:22 +0000)
committerrobertl <robertl>
Tue, 4 May 2010 13:22:17 +0000 (13:22 +0000)
case of -i csv-something -f non-xcsv-something file1 file2 case.

testo.d/classic-1.test
vecs.c

index d98d95e433d573e01ca0a26d5baece3564f569c6..d0b9f8251ac264bf63a6fa6181761efc84eeac58 100755 (executable)
@@ -103,6 +103,10 @@ compare ${REFERENCE}/lowrance-v3-unicsv.txt ${TMPDIR}/lowrance-v3-unicsv.txt
 gpsbabel  -i geo -f ${REFERENCE}/../geocaching.loc -o csv -F ${TMPDIR}/csv.csv
 gpsbabel  -i csv -f ${TMPDIR}/csv.csv -o csv -F ${TMPDIR}/csv2.csv
 compare ${TMPDIR}/csv2.csv ${TMPDIR}/csv.csv 
+# And the alternate command line version.
+gpsbabel  -i csv -o gpx ${TMPDIR}/csv.csv ${TMPDIR}/csv3.gpx
+gpsbabel  -i gpx -o csv ${TMPDIR}/csv3.gpx ${TMPDIR}/csv4.csv
+compare ${TMPDIR}/csv.csv ${TMPDIR}/csv4.csv 
 
 #
 # Delorme TopoUSA 4 is a CSV strain.  
diff --git a/vecs.c b/vecs.c
index 09289c43fd9e0c53c37b3e703d644dbade4d3d37..9e1cd6180229bef38c1e26529ec33b7d63e3e5a9 100644 (file)
--- a/vecs.c
+++ b/vecs.c
@@ -1200,7 +1200,7 @@ find_vec(char *const vecname, char **opts)
                        disp_vec_options(vec->name, vec->vec->args);
                
 #if CSVFMTS_ENABLED            
-               xcsv_setup_internal_style( NULL );
+               // xcsv_setup_internal_style( NULL );
 #endif // CSVFMTS_ENABLED              
                xfree(v);
                vec->vec->name = vec->name;     /* needed for session information */